package com.example.demo.entity.vo;

//+------------+--------------+------+-----+---------+----------------+
//        | Field      | Type         | Null | Key | Default | Extra          |
//        +------------+--------------+------+-----+---------+----------------+
//        | id         | int(11)      | NO   | PRI | NULL    | auto_increment |
//        | title      | varchar(100) | NO   |     | NULL    |                |
//        | content    | text         | NO   |     | NULL    |                |
//        | createtime | datetime     | YES  |     | NULL    |                |
//        | updatetime | datetime     | YES  |     | NULL    |                |
//        | uid        | int(11)      | NO   |     | NULL    |                |
//        | rcount     | int(11)      | NO   |     | 1       |                |
//        | state      | int(11)      | YES  |     | 1       |                |
//        +------------+--------------+------+-----+---------+---------------

import com.example.demo.entity.Articleinfo;
import lombok.Data;

import java.io.Serializable;

@Data
public class ArticleinfoVO extends Articleinfo implements Serializable {

    private final long serializable = 1L;//用来保证兼容序列化和反序列化版本；

    //新增的属性（用户表的用户名）
    private String username;

    //这里由于 lombok 的原因( lombok toString方法不会描述父类的属性)，
    @Override
    public String toString() {
        return "ArticleinfoVO{" +
                "username='" + username + '\'' +
                "} " + super.toString();
    }
}
